package com.sushi.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@ConfigurationProperties(prefix = "book")
public class Book {

    private String name;
    private String type;
    private int price;
    private Person auther;
    private List<String> charactors;

    public Book() {
    }

    public Book(String name, String type, int price, Person auther, List<String> charactors) {
        this.name = name;
        this.type = type;
        this.price = price;
        this.auther = auther;
        this.charactors = charactors;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", price=" + price +
                ", auther=" + auther +
                ", charactors=" + charactors +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public Person getAuther() {
        return auther;
    }

    public void setAuther(Person auther) {
        this.auther = auther;
    }

    public List<String> getCharactors() {
        return charactors;
    }

    public void setCharactors(List<String> charactors) {
        this.charactors = charactors;
    }
}
